﻿/***********************************************************************************************************************************
 *    Name: ZeroOrHero.sql
 *  Author: Frank Figearo — http://www.sqlnerd.me/ — frank@sqlnerd.me
 * Summary: Determine if Instant File Initialization is enabled. LDFs are *always* zeroed out; MDFs will not be zeroed out if the
 *	service account has been granted seManageVolumePrivilege.
**/
DBCC TRACEON (3004); DBCC TRACEON (3605); CREATE DATABASE ZeroOrHero;
DBCC TRACEOFF(3004); DBCC TRACEOFF(3605); DROP   DATABASE ZeroOrHero;
EXECUTE sys.xp_readerrorlog
	0,		-- Log File: 0=Current, n=Archive(n)
	1,		-- Log Type: 1=Error, 2=Agent
	N'Zero',-- Search String 1
	Null,	-- Search String 2
	Null,	-- Search From Time
	Null,	-- Search To Time
	'DESC';	-- Results Order: ASC or DESC
GO